'use strict';
import * as types from '../common/ActionTypes';
const initialState = {
    isZhiHuFetching: false,
    ZhiHuData:{},
}

export default function ZhiHuData(state = initialState, action){
    switch (action.type) {
        //正在获取轮播列表数据
        case types.FETCH_ZHIHU_LIST_ACTION:
                  return Object.assign({}, state, {
                      isZhiHuFetching: true
                  });
        //获取到轮播列表数据
        case types.RECEIVE_ZHIHU_LIST_ACTION:
                  return Object.assign({}, state, {
                       isZhiHuFetching: false,
                       ZhiHuData: action.ZhiHuData,
                  });
        default:
            return state;
    }
}
